//
//  FRQNoBluetoothYetViewController.m
//  FRQBluetoothKit_Example
//
//  Created by admin on 2023/10/23.
//  Copyright © 2023 xuchunhai. All rights reserved.
//

#import "FRQNoBluetoothYetViewController.h"
#import "NoBluetoothYetViews.h"
#import "FRQViewController.h"
@interface FRQNoBluetoothYetViewController ()
@property (nonatomic,strong) NoBluetoothYetViews *noBluetoothYetView;
@end

@implementation FRQNoBluetoothYetViewController
-(NoBluetoothYetViews *)noBluetoothYetView{
    if (nil==_noBluetoothYetView) {
        _noBluetoothYetView=skXibView(@"NoBluetoothYetViews");
        [self.view addSubview:_noBluetoothYetView];
        [_noBluetoothYetView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(self.mas_topLayoutGuide);
            make.bottom.mas_equalTo(self.mas_bottomLayoutGuide);
            make.right.left.mas_equalTo(0);
        }];
        @weakify(self)
        [[_noBluetoothYetView.btnConnect rac_signalForControlEvents:(UIControlEventTouchUpInside)] subscribeNext:^(__kindof UIControl * _Nullable x) {
            @strongify(self)
            //蓝牙12.01
            FRQViewController *view=[[FRQViewController alloc] init];
            view.typeShow=1;
            if(self.typeShow == 2){
                view.typeShow = 2;
            }else{
                view.typeShow = 1;
            }
            [self.navigationController pushViewController:view animated:YES];
        }];
        [[_noBluetoothYetView.btnConnect rac_signalForControlEvents:(UIControlEventTouchUpInside)] subscribeNext:^(__kindof UIControl * _Nullable x) {
            @strongify(self)
            //蓝牙12.01
            FRQViewController *view=[[FRQViewController alloc] init];
            view.typeShow=1;
            if(self.typeShow == 2){
                view.typeShow = 2;
            }else{
                view.typeShow = 1;
            }
            [self.navigationController pushViewController:view animated:YES];
        }];
        [[_noBluetoothYetView.btnBack rac_signalForControlEvents:(UIControlEventTouchUpInside)] subscribeNext:^(__kindof UIControl * _Nullable x) {
            @strongify(self)
            [self dismissViewControllerAnimated:YES completion:^{
                
            }];
            [self.navigationController popViewControllerAnimated:YES];
        }];
    }
    
    return _noBluetoothYetView;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"My NFTs Gallery";
    [self noBluetoothYetView];
    // Do any additional setup after loading the view.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
